Skip to content

Conversation

@kien-ngo
Copy link
Contributor

@kien-ngo kien-ngo commented Nov 15, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR focuses on refactoring the ConnectedWalletDetails component to utilize the AccountProvider for better account management and to prepare for future changes related to the React Native package.

Detailed summary

  • Updated JSDoc in wallet.ts to indicate future removal.
  • Replaced ConnectedWalletDetails usage with AccountProvider in ConnectButton.tsx.
  • Removed useConnectedWalletDetails hook usage in Details.tsx.
  • Integrated AccountAvatar, AccountBalance, and AccountName components for account details display.
  • Modified rendering logic for account avatar and name to use new components.
  • Enhanced balance display using AccountBalance component with improved loading states.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@vercel
Copy link

vercel bot commented Nov 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2024 5:41am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2024 5:41am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2024 5:41am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2024 5:41am

@changeset-bot
Copy link

changeset-bot bot commented Nov 15, 2024

⚠️ No Changeset found

Latest commit: 017b13f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 15, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Contributor Author

kien-ngo commented Nov 15, 2024

@kien-ngo kien-ngo changed the title update ConnectedWallet Nov 15, 2024
@kien-ngo kien-ngo changed the title ConnectedWallet ConnectedWalletDetails to use headless UI Nov 15, 2024
@kien-ngo kien-ngo marked this pull request as ready for review November 15, 2024 06:02
@kien-ngo kien-ngo force-pushed the kien/account-components branch from 59a23e4 to cd75491 Compare November 15, 2024 06:05
@github-actions
Copy link
Contributor

github-actions bot commented Nov 15, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 44.97 KB (0%) 900 ms (0%) 1.8 s (+24.91% 🔺) 2.7 s
thirdweb (cjs) 105.01 KB (0%) 2.2 s (0%) 3 s (+14.75% 🔺) 5.1 s
thirdweb (minimal + tree-shaking) 5.6 KB (0%) 113 ms (0%) 110 ms (+14.49% 🔺) 222 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 97 ms (+157.98% 🔺) 107 ms
thirdweb/react (minimal + tree-shaking) 18.38 KB (0%) 368 ms (0%) 430 ms (+167.48% 🔺) 797 ms

@kien-ngo kien-ngo force-pushed the kien/account-components-in-connect-button branch from b544236 to c5c7dd0 Compare November 15, 2024 06:05
@codecov
Copy link

codecov bot commented Nov 15, 2024

Codecov Report

Attention: Patch coverage is 16.34615% with 87 lines in your changes missing coverage. Please review.

Project coverage is 45.59%. Comparing base (3ce5673) to head (22e4d0f).

Files with missing lines Patch % Lines
...hirdweb/src/react/web/ui/ConnectWallet/Details.tsx 0.00% 72 Missing ⚠️
...b/src/react/web/ui/ConnectWallet/ConnectButton.tsx 53.12% 15 Missing ⚠️
Additional details and impacted files
@@                   Coverage Diff                    @@
##           kien/account-components    #5429   +/-   ##
========================================================
  Coverage                    45.58%   45.59%           
========================================================
  Files                         1076     1076           
  Lines                        55921    55927    +6     
  Branches                      4061     4058    -3     
========================================================
+ Hits                         25494    25500    +6     
  Misses                       29740    29740           
  Partials                       687      687           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from e0eea33
packages 40.74% <16.34%> (+<0.01%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
packages/thirdweb/src/react/core/utils/wallet.ts 4.82% <ø> (ø)
...b/src/react/web/ui/ConnectWallet/ConnectButton.tsx 49.01% <53.12%> (+<0.01%) ⬆️
...hirdweb/src/react/web/ui/ConnectWallet/Details.tsx 1.05% <0.00%> (-0.04%) ⬇️

... and 5 files with indirect coverage changes

---- 🚨 Try these New Features:

@gregfromstl
Copy link
Contributor

changelog

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 20, 2024

Merge activity

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on refactoring the wallet connection components in the `thirdweb` package, specifically enhancing the `ConnectButton` and `ConnectedWalletDetails` components by integrating `AccountProvider` and improving the handling of wallet details.

### Detailed summary
- Updated JSDoc comment in `useConnectedWalletDetails` to indicate its limited usage.
- Wrapped `ConnectedWalletDetails` with `AccountProvider` in `ConnectButtonInner`.
- Removed `useConnectedWalletDetails` from `ConnectedWalletDetails`.
- Enhanced `ConnectedWalletDetails` to use `AccountAvatar`, `AccountName`, and `AccountBalance` components.
- Updated props handling for connected account avatar and name in `ConnectedWalletDetails`.
- Refactored balance display logic in `ConnectedWalletDetails` to use `AccountBalance`.
- Modified `DetailsModal` to utilize `AccountProvider` and improved wallet avatar handling.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-queue Adds the pull request to Graphite's merge queue. packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants